import time

from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys

driver=webdriver.Firefox()
driver.get('https://www.baidu.com/')

ss=driver.find_element(By.ID,'kw')
ss.send_keys('web自动化')
ss.send_keys(Keys.ENTER)
time.sleep(2)

driver.find_element(By.XPATH,'/html/body/div[3]/div[3]/div[2]/div/div/a[2]/span').click()
time.sleep(2)

